-- @owner: @kyleze
-- @date: 2025-01-07
-- @testpoint: 创建全局临时表，指定ON COMMIT DELETE ROWS

--step1:创建表 expect：成功
drop table if exists t_page_table_test051;
create global temporary table t_page_table_test051(c1 int) on commit delete rows;

--step2:事务中插入数据，并查询数据，执行commit expect：成功，有数据，commit成功
begin;/
insert into t_page_table_test051 values(1);
insert into t_page_table_test051 values(2);
select * from t_page_table_test051;
commit;

--step3:重新查询数据 expect:无数据
select * from t_page_table_test051;

--step4:清理环境
drop table t_page_table_test051;
